﻿

alert("agora");

//function BindSubjects(subjects) 
//{
//    var cmb = $("#ctl00_ContentPlaceHolder1_ddlassunto")[0];

//    cmb.options.length = 0;
//    if (subjects.length == 0)
//        return;
//    for (var i = 0; i < subjects.length; ++i) 
//    {
//        var op = new Option(subjects[i].Description, subjects[i].ID);
//        cmb.options[i] = op;
//    }
//}



//function ClearFields() {
//    $("#ctl00_ContentPlaceHolder1_txtnome").val('');
//    $("#ctl00_ContentPlaceHolder1_txtemail").val('');
//    $("#ctl00_ContentPlaceHolder1_txttelefone").val('');
//    $("#ctl00_ContentPlaceHolder1_txtmensagem").val('');
//    $("[id$=ctl00_ContentPlaceHolder1_ddlassunto]").val("2");
//}

//$(document).ready(function() {
//alert("oi");
//ClearFields();
////    jQuery.jmsajax
////            ({
////                type: "POST",
////                url: contact_pathname,
////                method: "LoadSubjects",
////                success: function(data) {
////                    if (data != "") {
////                        response = eval("(" + data + ")");
////                        BindSubjects(response);
////                    }
////                }
////            });
//});

//$(function() {

//    
//    $("#ctl00_ContentPlaceHolder1_txttelefone").mask("(99)9999-9999");

//    $("#ctl00_ContentPlaceHolder1_frmcontato").validate({
//        rules: {
//            txtnome: { required: true }
//                , txtemail: { required: true }
//                , txttelefone: { required: true }
//                , ddlassunto: { required: true }
//                , txtmensagem: { required: true }
//        },
//        messages: {
//            txtnome: { required: "Preencha o campo nome." }
//			    , txtemail: { required: "Preencha o campo e-mail." }
//			    , txttelefone: { required: "Preencha o campo telefone." }
//			    , ddlassunto: { required: "Preencha o campo assunto." }
//			    , txtmensagem: { required: "Preencha o campo mensagem." }
//        },
//        submitHandler: function() {
////            $("#lblSuccess").hide();
////            $("#lblError").hide();

//            var name = $("#ctl00_ContentPlaceHolder1_txtnome").val();
//            var email = $("#ctl00_ContentPlaceHolder1_txtemail").val();
//            var phone = $("#ctl00_ContentPlaceHolder1_txttelefone").val();
//            var subject = $("#ctl00_ContentPlaceHolder1_ddlassunto").val();
//            var message = $("#ctl00_ContentPlaceHolder1_txtmensagem").val();

//        }
//    });
//});
